// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fowo.api.common.annotaion.*;
import com.fowo.api.common.mybatis.handlers.SysFileListTypeHandler;
import com.fowo.api.sys.entity.SysFile;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * InventoryReal
 */
@DS("ds24")
@Getter
@Setter
@TableName(value = "inventory", autoResultMap = true)
@Schema(title = "即时库存表")
public class InventoryReal implements Serializable {

  /**
   * 编号
   */
  @TableField(value = "`id`")
  @TableId(type = IdType.ASSIGN_ID)
  @Schema(title = "编号")
  private Long id;

  /**
   * 仓库内码
   */
  @TableField(value = "`stock_id`")
  @JoinField(Warehouse.class)
  @Schema(title = "仓库内码")
  private Long stockId;

  /**
   * FNSKU
   */
  @TableField(value = "`fn_sku`")
  @Schema(title = "FNSKU")
  private String fnSku;

  /**
   * 项目内码
   */
  @TableField(value = "`project_id`")
  @Schema(title = "项目内码")
  private Long projectId;

  /**
   * 物料内码
   */
  @TableField(value = "`item_id`")
  @JoinField(Product.class)
  @Schema(title = "物料内码")
  private Long itemId;

  /**
   * 创建时间
   */
  @TableField(value = "`create_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date createTime;

  /**
   * 创建人
   */
  @TableField(value = "`create_user`")
  @Schema(title = "创建人")
  private Long createUser;

  /**
   * 更新时间
   */
  @TableField(value = "`last_update_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "更新时间")
  private java.util.Date lastUpdateTime;

  /**
   * 更新人
   */
  @TableField(value = "`last_update_user`")
  @Schema(title = "更新人")
  private Long lastUpdateUser;

  /**
   * 删除标记
   */
  @TableField(value = "`del_flag`")
  @TableLogic
  @Schema(title = "删除标记")
  private Boolean delFlag;

  /**
   * 批号
   */
  @TableField(value = "`batch_no`")
  @Schema(title = "批号")
  private String batchNo;

  /**
   * 保质期(天)
   */
  @TableField(value = "`shelf_life`")
  @Schema(title = "保质期(天)")
  private Integer shelfLife;

  /**
   * 生产日期
   */
  @TableField(value = "`production_date`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "生产日期")
  private java.util.Date productionDate;

  /**
   * 有效期至
   */
  @TableField(value = "`expiry_date`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "有效期至")
  private java.util.Date expiryDate;

  /**
   * 库存数量
   */
  @TableField(value = "`stock_qty`")
  @Schema(title = "库存数量")
  private Long stockQty;

  /**
   * 库存金额
   */
  @TableField(value = "`stock_amount`")
  @Schema(title = "库存金额")
  private java.math.BigDecimal stockAmount;

  /**
   * 辅助计量内码
   */
  @TableField(value = "`aux_id`")
  @Schema(title = "辅助计量内码")
  private Integer auxId;

  /**
   * 辅助数量
   */
  @TableField(value = "`aux_qty`")
  @Schema(title = "辅助数量")
  private java.math.BigDecimal auxQty;

  /**
   * 锁库数量
   */
  @TableField(value = "`lock_qty`")
  @Schema(title = "锁库数量")
  private java.math.BigDecimal lockQty;

  /**
   * 陈列数量
   */
  @TableField(value = "`display_qty`")
  @Schema(title = "陈列数量")
  private java.math.BigDecimal displayQty;

  /**
   * 残次数量
   */
  @TableField(value = "`defect_qty`")
  @Schema(title = "残次数量")
  private java.math.BigDecimal defectQty;

  /**
   * 在途数量
   */
  @TableField(value = "`way_qty`")
  @Schema(title = "在途数量")
  private java.math.BigDecimal wayQty;

  /**
   * 数据版本
   */
  @TableField(value = "`version`")
  @Schema(title = "数据版本")
  private Integer version;

  /**
   * 品名
   */
  @TableField(value = "`trade_name`")
  @JoinField(Product.class)
  @Schema(title = "品名")
  private Long tradeName;

  /**
   * 产品标签
   */
  @TableField(value = "`prd_label`")
  @Schema(title = "产品标签")
  private String prdLabel;

  /**
   * 产品类型
   */
  @TableField(value = "`product_type`")
  @Schema(title = "产品类型")
  private String productType;

  /**
   * 产品状态
   */
  @TableField(value = "`product_status`")
  @Schema(title = "产品状态")
  private String productStatus;

  /**
   * 店铺
   */
  @TableField(value = "`shop_id`")
  @JoinField(ShopInfo.class)
  @Schema(title = "店铺")
  private Long shopId;

  /**
   * MSKU
   */
  @TableField(value = "`msku`")
  @Schema(title = "MSKU")
  private String msku;

  /**
   * 仓库
   */
  @TableField(value = "`ware_house`")
  @JoinField(Warehouse.class)
  @Schema(title = "仓库")
  private Long wareHouse;

  /**
   * Listing负责人
   */
  @TableField(value = "`listing_head`")
  @JoinField(ListingFather.class)
  @Schema(title = "Listing负责人")
  private Long listingHead;

  /**
   * 可用量
   */
  @TableField(value = "`availble_num`")
  @Schema(title = "可用量")
  private Integer availbleNum;

  /**
   * 可用锁定量
   */
  @TableField(value = "`locks_available_amount`")
  @Schema(title = "可用锁定量")
  private Integer locksAvailableAmount;

  /**
   * 次品量
   */
  @TableField(value = "`defective_quantity`")
  @Schema(title = "次品量")
  private Integer defectiveQuantity;

  /**
   * 次品锁定量
   */
  @TableField(value = "`defective_lock_amount`")
  @Schema(title = "次品锁定量")
  private Integer defectiveLockAmount;

  /**
   * 预锁定量
   */
  @TableField(value = "`pre_lock_amount`")
  @Schema(title = "预锁定量")
  private Integer preLockAmount;

  /**
   * 待检待上架量
   */
  @TableField(value = "`inspected`")
  @Schema(title = "待检待上架量")
  private Integer inspected;

  /**
   * 待到货量
   */
  @TableField(value = "`wait`")
  @Schema(title = "待到货量")
  private Integer wait;

  /**
   * 期望可用量
   */
  @TableField(value = "`expect_amount`")
  @Schema(title = "期望可用量")
  private Integer expectAmount;

  /**
   * 期望待到货量
   */
  @TableField(value = "`expect_arrive`")
  @Schema(title = "期望待到货量")
  private Integer expectArrive;

  /**
   * 调拨在途
   */
  @TableField(value = "`transfer`")
  @Schema(title = "调拨在途")
  private Integer transfer;

  /**
   * 移除在途
   */
  @TableField(value = "`remove_progress`")
  @Schema(title = "移除在途")
  private Integer removeProgress;

  /**
   * 实际总量
   */
  @TableField(value = "`actual_total`")
  @Schema(title = "实际总量")
  private Integer actualTotal;

  /**
   * 预计总量
   */
  @TableField(value = "`estimated_total`")
  @Schema(title = "预计总量")
  private Integer estimatedTotal;

  /**
   * 采购单价
   */
  @TableField(value = "`purchase_price`")
  @Schema(title = "采购单价")
  private java.math.BigDecimal purchasePrice;

  /**
   * 单位费用
   */
  @TableField(value = "`unit_costs`")
  @Schema(title = "单位费用")
  private java.math.BigDecimal unitCosts;

  /**
   * 单位头程
   */
  @TableField(value = "`unit_head_stroke`")
  @Schema(title = "单位头程")
  private java.math.BigDecimal unitHeadStroke;

  /**
   * 单位库存成本
   */
  @TableField(value = "`unit_inventory_cost`")
  @Schema(title = "单位库存成本")
  private java.math.BigDecimal unitInventoryCost;

  /**
   * 货值
   */
  @TableField(value = "`goods_value`")
  @Schema(title = "货值")
  private java.math.BigDecimal goodsValue;

  /**
   * 费用
   */
  @TableField(value = "`expenses`")
  @Schema(title = "费用")
  private java.math.BigDecimal expenses;

  /**
   * 头程
   */
  @TableField(value = "`head_stroke`")
  @Schema(title = "头程")
  private java.math.BigDecimal headStroke;

  /**
   * 库存成本
   */
  @TableField(value = "`inventory_cost`")
  @Schema(title = "库存成本")
  private java.math.BigDecimal inventoryCost;

  /**
   * 平均库龄
   */
  @TableField(value = "`average_inventory_age`")
  @Schema(title = "平均库龄")
  private Integer averageInventoryAge;

  /**
   * 预警状态
   */
  @TableField(value = "`alert_status`")
  @Schema(title = "预警状态")
  private String alertStatus;

  /**
   * 0-15天库龄
   */
  @TableField(value = "`age0`")
  @Schema(title = "0-15天库龄")
  private String age0;

  /**
   * 16-30天库龄
   */
  @TableField(value = "`age16`")
  @Schema(title = "16-30天库龄")
  private String age16;

  /**
   * 31-90天库龄
   */
  @TableField(value = "`age31`")
  @Schema(title = "31-90天库龄")
  private String age31;

  /**
   * 91天以上库龄
   */
  @TableField(value = "`age91`")
  @Schema(title = "91天以上库龄")
  private String age91;

  /**
   * SPU
   */
  @TableField(value = "`spu`")
  @JoinField(Product.class)
  @Schema(title = "SPU")
  private Long spu;

  /**
   * 图片
   */
  @TableField(value = "`img`", typeHandler = SysFileListTypeHandler.class)
  @Schema(title = "图片")
  private List<SysFile> img;

  /**
   * 仓位
   */
  @TableField(value = "`pos`")
  @JoinField(WarehouseBin.class)
  @Schema(title = "仓位")
  private Long pos;
}
